/**
 * 
 */
package cn.com.wms.service.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.wms.Base.DefaultBaseService;
import cn.com.wms.Base.FilterInfo;
import cn.com.wms.Base.QueryResult;
import cn.com.wms.Base.pageInfo.PagingBean;
import cn.com.wms.dao.BaseDao;
import cn.com.wms.mapping.MaterialMapper;
import cn.com.wms.model.MaterialInfoBean;
import cn.com.wms.model.Usertest;
import cn.com.wms.service.MaterialInfoService;



/**
 * ClassName: MaterialInfoServiceImpl 
 * @Description: TODO
 * @author chj
 * @date 2017年5月23日
 */
@Service("materialInfoService")
public class MaterialInfoServiceImpl extends DefaultBaseService implements MaterialInfoService {
	@Autowired
	private BaseDao<MaterialInfoBean> iBaseDao;

	@Autowired
	private MaterialMapper materialMapper;
		
	

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#save(com.my.web.model.Usertest)
	 */
	public Serializable save(Usertest entity) {

		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#get(java.lang.String)
	 */
	public Usertest get(String hql) {
		
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#get(java.lang.Class, java.io.Serializable)
	 */
	public Usertest get(Class<Usertest> c, Serializable id) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#get(java.lang.String, java.util.Map)
	 */
	public Usertest get(String hql, Map<String, Object> params) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#find(java.lang.String, java.util.Map)
	 */
	public List<Usertest> find(String hql, Map<String, Object> params) {
		
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#delete(com.my.web.model.Usertest)
	 */
	public void delete(Usertest entity) {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.my.web.service.IUserService#update(com.my.web.model.Usertest)
	 */
	public void update(Usertest entity) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.my.web.service.IUserService#verifyByName(java.lang.String)
	 */
	public boolean verifyByName(String name) {
		String hql = "FROM Usertest WHERE name=:name";
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("name", name);
		List<Usertest> li = new ArrayList<Usertest>();
		if (li.size() > 0) {
			return true;
		} else {
			return false;
		}
	}

	public QueryResult queryResultMaterialInfoList(FilterInfo filters, PagingBean pageBean) {
		// TODO Auto-generated method stub
		String composedListHQL = "from MaterialInfoBean ";
		String composedCountHQL ="select count(*) from MaterialInfoBean ";
		QueryResult queryResult=this.iBaseDao.queryPage_Hibernate_D_ComposedHQL(composedListHQL, composedCountHQL, filters, pageBean);
		return queryResult;
	}

	@Override
	public List<MaterialInfoBean> queryMaterialInfoList() {
		// TODO Auto-generated method stub
		return materialMapper.getAll();
	}

}
